﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace WeiSiCopy
{
    public class Step
    {
        public void CopyToTemp()
        {
            DirectoryInfo sfd = new DirectoryInfo(BaseSetting.SrcPath);
            FileSystemInfo[] sfs = sfd.GetFileSystemInfos();
            foreach (FileSystemInfo f_obj in sfs)
            {
                FileInfo sf = new FileInfo(f_obj.FullName);
                sf.Wei_MoveToAddDate(BaseSetting.TempPath, f_obj);
            }
        }

        public List<Apply> TempToList()
        {
            List<Apply> list = null;

            FileHandle fd = new FileHandle();
            DirectoryInfo tfd = new DirectoryInfo(BaseSetting.TempPath);
            FileSystemInfo[] tfs = tfd.GetFileSystemInfos();
            foreach (FileSystemInfo f_obj in tfs)
            {
                list = list.Wei_AddRange(fd.ReadToApply(f_obj));
            }

            return list;
        }
    }
}
